home *** CD-ROM | disk | FTP | other *** search
- PROCEDURE ListFile
- *-----------------------------------------------------------------------
- *-- Program.....: LISTFILE.PRG
- *-- Programmer..: Kenneth J. Mayer (CIS: 71333,1030)
- *-- Date........: 07/28/1993
- *-- Notes.......: This program/set of routines is designed to display an
- *-- ASCII file of up to 1,170 lines, and 254 characters
- *-- per line on the screen.
- *-- ** WARNING ** in dBASE IV, 1.5 -- if you get close to
- *-- the 1,170 line limit, you will run out of memory.
- *-- (If using version 2.0 or greater, you may be able to
- *-- read in 10,000 lines ... the array capabilities
- *-- allow up to 64K lines (65,535 elements), but I
- *-- figured that 10000 was pretty huge ...)
- *-- It allows scrolling (up,down,left,right), and a few
- *-- hot-keys as well:
- *-- <Home> = the beginning/first character of
- *-- the line
- *-- <End> = the right side of a line
- *-- <Ctrl><Home> = the top of the file
- *-- <Ctrl><End> = the bottom of the file
- *-- <PgUp>/<PgDn> = page up/down one screen at a time
- *-- <Esc>/<Enter> = exit
- *-- <S> or <s> = Search (text search from location to
- *-- end)
- *-- <F1> = HELP
- *-- Rev. History: 01/25/1993 -- Original Release
- *-- 02/24/1993 -- Minor modifications -- if user sends #
- *-- of lines that would give a window larger
- *-- than the screen can handle (nMaxLines +
- *-- nRow > length of screen), we set the max
- *-- number of lines to the length of the
- *-- screen. Also Added <Enter> to exit
- *-- routine.
- *-- 03/11/1993 -- Minor change for version 2.0 -- allows
- *-- up to 10,000 lines ... no guarantees on
- *-- whether or not you will run out of
- *-- memory.
- *-- 04/29/1993 -- Added HELP on F1
- *-- Added a "Search" feature.
- *-- Minor difference in how colors are used.
- *-- Usage.......: DO ListFile WITH <cFileName>,<nRow>[,<nMaxLines>[,;
- *-- <nTab>[,<cColor>]]]
- *-- Example.....: do listfile with "ListFile.PRG",5,18,3,"rg+/g"
- *-- Parameters..: cFileName = name of file to list -- include extension
- *-- and path if necessary
- *-- nRow = starting row on screen (top of "window")
- *-- nMaxLines = optional -- number of lines to display at
- *-- one time -- if left off, routine will use
- *-- as many lines as possible from nRow to
- *-- bottom of screen.
- *-- nTab = optional -- number of spaces to use for
- *-- tab characters at the beginning of a line.
- *-- Ignores tabs after the first non-tab
- *-- character in a line for speed's sake.
- *-- cColor = optional -- provide color description for
- *-- window, format: Foreground/Background.
- *-- For example, to display the file in a
- *-- window that has yellow text on a green
- *-- background, the parameter would be:
- *-- "rg+/g"
- *-- The second colors provided will be used
- *-- for HELP and dialog box colors. I.e.,
- *-- a color string: "rg+/g,w+/b", the second
- *-- pair of colors will be used for help and
- *-- such.
- *-- If no colors are provided, the main
- *-- screen will be the current colors
- *-- (SET COLOR TO), and the help and other
- *-- colors will be the highlight colors
- *-- (set color of ...) from the attribute
- *-- string.
- *-----------------------------------------------------------------------
-
- parameters cFileName,nRow,nMaxLines,nTab,cColor
- private cWindow,cCursor,nDisplay,nBottom,nLastLine,x,nCount,;
- nKey,nFirstLine,nCurrPos,cSearch
-
- *-- cSearch is initialized here, but we want to save the current
- *-- value of it, so that if a search is performed, and the user
- *-- wants to do another search later on the same criteria,
- *-- they can ... (search for next occurance?)
- m->cSearch = space(20) && Search criteria
- m->lCase = .f. && case sensitive search?
-
- *-- screen handling
- save screen to sListFile && save screen description
- m->cWindow = window() && store name of any "current" window
- && on screen
- m->cCursor = set("CURSOR") && save current cursor state
- set cursor off && turn it off ...
- activate screen && activate screen so we can display
- && on TOP of anything there.
- if pCount() > 4 && if user gave us a set of colors to
- && use
- m->cNewColor = "COLOR "+m->cColor && define memvar with the
- && word "COLOR" in it
- else
- m->cTemp = set("ATTRIBUTE")
- m->cNorm = colorbrk(m->cTemp,1)
- m->cHigh = colorbrk(m->cTemp,2)
- m->cColor = m->cNorm+","+m->cHigh
- m->cNewColor = "COLOR " + m->cColor && otherwise, set
- && to system default
- endif
-
- *-- if user gave a value for nMaxLines, and it's too big, we
- *-- have set nMaxLines to bottom of screen.
- if pCount() => 3 && we have a parameter passed for this
- if set("DISPLAY") # "MONO" .and. set("DISPLAY") # "COLOR"
- m->nDisplay = val(right(set("DISPLAY"),2))
- if (m->nMaxLines + m->nRow) => m->nDisplay
- m->nMaxLines = (m->nDisplay - 1) - m->nRow
- && if nDisplay gives 25,
- && set to 24, as the screen
- && goes from 0 to 24 ...
- endif
- else
- if (m->nMaxLines + m->nRow) > 24
- m->nMaxLines = 24 - m->nRow
- endif
- endif
- endif
-
- *-- if user didn't tell us how many lines to display ...
- if pCount() = 2 && determine # of lines to display on screen ...
- *-- find bottom of screen, and then subtract nRow from that ...
- if set("DISPLAY") # "MONO" .and. set("DISPLAY") # "COLOR"
- && if we have such displays as EGA25, or VGA50 ...
- m->nDisplay = val(right(set("DISPLAY"),2))
- && get the value of the right
- else && two characters
- m->nDisplay = 25 && if MONO/COLOR, we have 25
- && lines possible
- endif
- if set("STATUS") = "ON" && if status line is on, we
- && have four less
- && lines to work with
- m->nDisplay = m->nDisplay - 4
- endif
- m->nMaxLines = (m->nDisplay - 1) - m->nRow
- && nDisplay - 1 is so we don't
- && go beyond last line (EGA25
- && gives 25, but last line is
- && number 24!)
- endif
-
- *-- bottom row of window is based on m->nMaxLines
- m->nBottom = m->nRow + m->nMaxLines
-
- *-- set default tab if needed ...
- if pCount() < 4 && set default ... notice that if it's 0,
- && that's not 'undefined'
- m->nTab = 5
- endif
-
- *-- get the number of lines in the text file
- m->nLastLine = TextLine(m->cFileName) && obtain line number of
- && last line of file
- m->nVersion = val(right(version(),3)) && get version #
- if m->nVersion < 2.0 && if less 2.0
- if m->nLastLine > 1170 && max lines we can
- && read into array
- m->nLastLine = 1170 && is 1,170
- endif
- else && we have version 2.0
- && or greater
- if m->nLastLine > 10000 && we can display
- && 10,000 lines
- m->nLastLine = 10000
- endif
- endif
-
- *-- display a message for user to let them know we haven't just
- *-- disappeared ...
- do shadow with 10,26,13,52
- m->cBoxColor = colorbrk(m->cColor,2)
- @10,26 to 13,52 double color &cBoxColor.
- @11,27 say " Reading/Processing File " color &cBoxColor.
- m->cLines = space(7)+transform(m->nLastLine,"99999")+;
- " Lines"+space(7)
- @12,27 say m->cLines color &cBoxColor.
-
- *-- get it
- m->x = AAppend(m->cFileName,"aFileList") && put file into array
-
- *-- deal with tabs here
- if m->nTab # 0
- m->nCount = 1
- do while m->nCount < m->nLastLine
- do while chr(9) $ aFileList[m->nCount] && loop while
- && there is a tab
- && in the line
- aFileList[m->nCount] = ;
- stuff(aFileList[m->nCount],at(chr(9),;
- aFileList[m->nCount]),1,;
- space(m->nTab))
- enddo
- m->nCount = m->nCount + 1
- enddo
- endif
-
- *-- loop and pad each array element with spaces to 254
- *-- characters
- m->nCount = 1
- do while m->nCount < m->nLastLine
- aFileList[m->nCount] = aFileList[m->nCount]+;
- space(254-len(aFileList[m->nCount]))
- m->nCount = m->nCount + 1
- enddo
-
- *-- remove message
- restore screen from sListFile
-
- *-- define window
- define window wListFile from m->nRow,0 to m->nBottom,79 ;
- none &cNewColor.
- activate window wListFile
-
- *-- now that we're here, let's go ...
- m->nKey = 0 && initialize to something we're not
- && looking for
- m->nFirstLine = 1 && First line to display out of list ...
- m->nCurrPos = 1 && current position in string
-
- *-----------------------------
- *-- here's the actual loop ...
- *-----------------------------
- do while m->nKey # 27 .and. m->nKey # 13
- && must press <Esc> or <Enter> to exit
-
- *-- display loop
- m->nCounter = 0
- do while m->nCounter < m->nMaxLines
-
- @m->nCounter,0 say substr(aFileList[m->nFirstLine+;
- m->nCounter],m->nCurrPos,80)
- m->nCounter = m->nCounter + 1
-
- enddo
-
- *-- get keypress
- m->nKey = inkey(0) && wait for a keypress
-
- *-- if keypress is one of the following, do something
- *-- with it ...
- do case
- case m->nKey = 5 && up arrow = up one row
- if m->nFirstLine > 1
- m->nFirstLine = m->nFirstLine - 1
- endif
- case m->nKey = 24 && down arrow = down one row
- if m->nFirstLine+m->nMaxLines < m->nLastLine
- m->nFirstLine = m->nFirstLine + 1
- endif
- case m->nKey = 3 && <PgDn> = down one screen
- if m->nFirstLine+m->nMaxLines < ;
- (m->nLastLine - m->nMaxLines)
- m->nFirstLine = m->nFirstLine + m->nMaxLines
- else
- m->nFirstLine = m->nLastLine - m->nMaxLines
- endif
- case m->nKey = 18 && <PgUp> = up one screen
- if m->nFirstLine - m->nMaxLines > 1
- m->nFirstLine = m->nFirstLine - m->nMaxLines
- else
- m->nFirstLine = 1
- endif
- case m->nKey = 23 && <Ctrl><End> = End of File
- m->nFirstLine = m->nLastLine - m->nMaxLines
- case m->nKey = 29 && <Ctrl><Home> = Beginning of File
- m->nFirstLine = 1
- case m->nKey = 19 && <Left> = Back up one character
- if m->nCurrPos > 1
- m->nCurrPos = m->nCurrPos - 1
- endif
- case m->nKey = 4 && <Right> = Go RIGHT one character
- if m->nCurrPos < 174 && 254-80 (width of string -
- && screen width
- m->nCurrPos = m->nCurrPos + 1
- endif
- case m->nKey = 2 && <End> = end of line
- m->nCurrPos = 174 && show last character(s) on right side
- && of text
- case m->nKey = 26 && <Home> = beginning of line
- m->nCurrPos = 1
- case m->nKey = 28 && <F1> -- HELP routine
- do showhelp
- case m->nKey = 83 .or. m->nKey = 115 && "S" or "s"
- do searcher
- endcase
-
- enddo
-
- *-- if here, we <Esc>aped out of the loop
- release window wListFile
- restore screen from sListFile
- release screen sListFile
- if .not. isblank(m->cWindow)
- activate window &cWindow.
- endif
- release aFileList
- set cursor &cCursor.
-
- RETURN
- *-- EoP: ListFile
-
- *-----------------------------------------------------------------------
- *-- These next two routines were written FOR this program
- *-----------------------------------------------------------------------
-
- PROCEDURE ShowHelp
- *-----------------------------------------------------------------------
- *-- Programmer..: Ken Mayer (CIS: 71333,1030)
- *-- Date........: 04/29/1993
- *-- Notes.......: A simple help routine for LISTFILE.PRG
- *-- Written for.: dBASE IV, 2.0
- *-- Rev. History: 04/29/1993
- *-- Calls.......: Shadow
- *-- Called by...: LISTFILE.PRG
- *-- Usage.......: do ShowHelp
- *-- Example.....: do ShowHelp
- *-- Returns.....: None
- *-- Parameters..: None
- *-----------------------------------------------------------------------
-
- *-- process colors
- m->cForgCol = colorbrk(m->cColor,2)
- m->cBackCol = colorbrk(m->cColor,1)
- m->cHColor = m->cForgCol+","+m->cBackCol+","+m->cForgCol
-
- *-- deal with saving screen and defining window
- save screen to sHelp
- activate screen
- define window wHelp from 6,8 to 18,72 double color &cHColor.
- do shadow with 6,8,18,72
- activate window wHelp
-
- *-- display help information
- @0,28 say "H E L P"
- @2, 2 say "<Home> = The beginning/first character of "+;
- "the line"
- @3, 2 say "<End> = The right side of a line"
- @4, 2 say "<Ctrl><Home> = The top of the file"
- @5, 2 say "<Ctrl><End> = The bottom of the file"
- @6, 2 say "<PgUp>/<PgDn> = Page Up/Down one screen at a time"
- @7, 2 say "<Esc>/<Enter> = Exit"
- @8, 2 say "<S> or <s> = Search for text from current line "+;
- "to end"
- @10, 2 say " ... Press any key when ready ..."
-
- *-- wait for user to press a key
- m->x=inkey(0)
-
- *-- clean up
- release window wHelp
- restore screen from sHelp
- release screen sHelp
- activate window wListFile
-
- RETURN
- *-- EoP: ShowHelp
-
- PROCEDURE Searcher
- *-----------------------------------------------------------------------
- *-- Programmer..: Ken Mayer (CIS: 71333,1030)
- *-- Date........: 04/29/93
- *-- Notes.......: Search the array used in LISTFILE.PRG. Asks user in a
- *-- simple dialog box what to search for, and whether or
- *-- not to perform the search as case sensitive.
- *-- Written for.: dBASE IV, 2.0
- *-- Rev. History: 04/29/93 -- Original
- *-- Calls.......: Shadow
- *-- Called by...: LISTFILE.PRG
- *-- Usage.......: Do Searcher
- *-- Example.....: Do Searcher
- *-- Returns.....: None
- *-- Parameters..: None
- *-----------------------------------------------------------------------
-
- *-- get colors
- m->cForgCol = colorbrk(m->cColor,2)
- m->cBackCol = colorbrk(m->cColor,1)
- m->cSColor = m->cForgCol+","+m->cBackCol+","+m->cForgCol
-
- *-- deal with screen/window
- save screen to sSearch
- activate screen
- define window wSearch from 10,22 to 13,59 double color &cSColor.
- do shadow with 10,22,13,59
-
- *-- cSearch is initialized at the beginning of LISTFILE, and not
- *-- changed after the "first" search, unless the user changes it.
- *-- the same goes for lCase ...
- m->cSearch = m->cSearch+space(20-len(m->cSearch)) && pad back out
- && to 20 characters
-
- *-- start 'er up
- activate window wSearch
- set curs on
- @0,2 say "Search for: " get m->cSearch && 20 characters
- @1,2 say "Case Sensitive? " get m->lCase picture "Y"
- read
-
- *-- if empty search string or <Esc> was pressed ...
- if isblank(m->cSearch) .or. lastkey() = 27
- release window wSearch
- restore screen from sSearch
- release screen sSearch
- RETURN
- endif
-
- *-- do it ...
- set curs off
- m->cSearch = trim(m->cSearch) && remove extra spaces
- m->nCount = m->nFirstLine && start at the current position in
- && array
- m->lFound = .f.
- if .not. m->lCase && not case sensitive, convert to caps and search
- m->cSearchIt = upper(m->cSearch)
- do while m->nCount < m->nLastLine && from current line to end
- if m->cSearchIt $ upper(aFileList[m->nCount])
- && if a match is found
- m->lFound = .t. && set memvar
- exit && exit loop
- endif
- m->nCount = m->nCount + 1
- enddo
- else
- do while m->nCount < m->nLastLine
- if m->cSearch $ aFileList[m->nCount]
- m->lFound = .t.
- exit
- endif
- m->nCount = m->nCount + 1
- enddo
- endif
-
- *-- put this line at top of screen, or near it
- if m->lFound
- m->nFirstLine = m->nCount
- *-- some of the same logic as a <PgDn> (sort of)
- if m->nFirstLine+m->nMaxLines => (m->nLastLine - m->nMaxLines)
- m->nFirstLine = m->nLastLine - m->nMaxLines
- endif
- else
- @1,0 clear
- @1,2 say "** No Match Found **"
- m->x=inkey(0)
- endif
-
- *-- cleanup
- release window wSearch
- restore screen from sSearch
- release screen sSearch
- activate window wListFile
-
- RETURN
- *-- EoP: Searcher
-
- *-----------------------------------------------------------------------
- *-- The rest of the functions below are from the dUFLP library
- *-- (available on Compuserve and the USSBBS), and are freeware. They are
- *-- used in the main program and/or in the two routines above ... A
- *-- couple of them have been modified specifically for this routine.
- *-- If you want the originals, look in the appropriate files in the
- *-- dUFLP library (GO CIS:DBASE or GO PCM:TIPS).
- *-----------------------------------------------------------------------
-
- FUNCTION AAppend
- *-----------------------------------------------------------------------
- *-- Programmer..: Adam L. Menkes (Borland Technical Support)
- *-- Date........: 03/11/1993
- *-- Notes.......: Appends a text file into an array. This routine is
- *-- limited to text files of 1,170 lines, and 254
- *-- characters per line. (Modified by KJM for this routine
- *-- only to handle up to 10000 lines for version 2.0 of
- *-- dBASE IV) The text file must be an ASCII Txt formatted
- *-- file. Taken from Technotes, April, 1992.
- *-- Written for.: dBASE IV, 1.5
- *-- Rev. History: 04/01/1992 -- Original Release
- *-- 02/24/1993 -- Modified to deal with nLines possibly
- *-- larger than 1170 -- if so, we blow up.
- *-- This has been fixed.
- *-- 03/11/1993 -- Version 2.0 of dBASE IV allows up to 64K
- *-- for an array, but I cut it off at 10,000
- *-- Calls.......: TextLine() Function in LOWLEVEL.PRG
- *-- Called by...: Any
- *-- Usage.......: AAppend(<cFileName>,<aArrayName>)
- *-- Example.....: ?AAppend("CONFIG.DB","aConfig")
- *-- Returns.....: .T.
- *-- Parameters..: cFileName = Name of DOS Text file to read into array
- *-- aArrayName = Name of array to create. If it already
- *-- exists, this array will be destroyed and
- *-- overwritten.
- *-----------------------------------------------------------------------
-
- parameters cFileName, aArrayName
- private aTArray, nLines, nX, nHandle
-
- *-- assign array name to a temp variable name ...
- aTArray = aArrayName
- *-- if it exists, get rid of it, and then re-define it
- release &aTArray.
- public &aTArray.
- m->nLines = TextLine(m->cFileName) && get number of lines
- if val(right(version(0),3)) < 2 && version 2.0 or less
- if m->nLines > 1170
- m->nLines = 1170
- endif
- else
- if m->nLines > 10000
- m->nLines = 10000
- endif
- endif
- declare &aTArray.[min(m->nLines,10000)]
-
- *-- get file handle
- m->nHandle = fopen(m->cFileName)
-
- *-- store the file into the array
- m->nX = 1
- do while m->nX <= m->nLines
- store fgets(m->nHandle,254) to &aTArray.[m->nX]
- m->nX = m->nX + 1
- enddo
-
- *-- close the file
- m->nHandle = fClose(m->nHandle)
-
- RETURN .T.
- *-- EoF: AAppend()
-
- FUNCTION TextLine
- *-----------------------------------------------------------------------
- *-- Programmer..: Adam L. Menkes (Borland Technical Support)
- *-- Date........: 04/01/1992
- *-- Notes.......: Returns the number of lines of text in an ASCII Text
- *-- File. Taken from TechNotes, April, 1992
- *-- Written for.: dBASE IV, 1.5
- *-- Rev. History: 04/01/1992 -- Original Release
- *-- Calls.......: None
- *-- Called by...: Any
- *-- Usage.......: TextLine(<cTextFile>)
- *-- Example.....: ?TextLine("CONFIG.DB")
- *-- Returns.....: Number of lines
- *-- Parameters..: cTextFile = name of file
- *-----------------------------------------------------------------------
-
- parameter cTextFile
- private nLines, nHandle, cTemp, nClose
-
- m->nLines = 0
- if file(m->cTextFile) && if it exists ...
- m->nHandle = fopen(m->cTextFile,"R")
- do while .not. feof(m->nHandle)
- m->cTemp = fgets(m->nHandle,254)
- m->nLines = m->nLines + 1
- enddo
- m->nClose = fclose(m->nHandle)
- endif
-
- RETURN m->nLines
- *-- EoF: TextLine()
-
- FUNCTION ColorBrk
- *-----------------------------------------------------------------------
- *-- Programmer..: Ken Mayer (CIS: 71333,1030)
- *-- Date........: 03/24/1993
- *-- Notes.......: This routine is designed to be used with any of my
- *-- functions and procedures that accept a memory variable
- *-- for color, and use a window. It's purpose is to break
- *-- that color var into it's components (depending on
- *-- which one the user wants) and return those
- *-- components, so that they can then be used in SET COLOR
- *-- OF ... commands.
- *-- Written for.: dBASE IV, 1.1, 1.5 (written because of 1.5, but will
- *-- work in 1.1)
- *-- Rev. History: 07/22/1992 - modified to handle memvars/color strings
- *-- that may have only two parts to them (no
- *-- <border>...), so that if the <nField>
- *-- parm is 2, we get a valid value.
- *-- 03/24/1993 -- Lee Hite - Fixed to work correctly when
- *-- <cColorVar> contains a single colorset (i.e., "b/w").
- *-- Calls.......: None
- *-- Called by...: Any
- *-- Usage.......: ColorBrk(<cColorVar>,<nField>)
- *-- Example.....: set color of normal to ColorBrk(cColor,1)
- *-- Returns.....: Either the field you asked for (1 thru 3) or null
- *-- string ("").
- *-- Parameters..: cColorVar = Color variable to extract data from
- *-- Assumes the form:
- *-- <main color>,<highlight>,<border>
- *-- Where each part uses:
- *-- <foreground>/<background> format --
- *-- i.e., rg+/gb,w+/b,rg+/gb
- *-- nField = Field you want to extract
- *-----------------------------------------------------------------------
-
- parameters cColorVar, nField
- private cReturn, cExtracted
-
- do case
- case m->nField = 1
- if at(",",m->cColorVar) > 0
- m->cReturn = left(m->cColorVar,at(",",m->cColorVar)-1)
- else
- m->cReturn = m->cColorVar
- endif
- case m->nField = 2
- m->cExtract = substr(m->cColorVar,at(",",m->cColorVar)+1)
- && everything to the right of the comma
- if at(",",m->cExtract) > 0
- m->cReturn = left(m->cExtract,at(",",m->cExtract)-1)
- && left of second ,
- else
- m->cReturn = m->cExtract
- endif
- case m->nField = 3
- m->cExtract = substr(m->cColorVar,at(",",m->cColorVar)+1)
- if at(",",m->cExtract) > 0
- m->cReturn = substr(m->cExtract,at(",",m->cExtract)+1)
- else
- m->cReturn = ""
- endif
- otherwise
- m->cReturn = ""
- endcase
-
- RETURN m->cReturn
- *-- EoF: ColorBrk()
-
- PROCEDURE Shadow
- *-----------------------------------------------------------------------
- *-- Programmer..: Ashton-Tate
- *-- Date........: 01/27/1992
- *-- Notes.......: Creates a shadow for a window (taken from the dBASE IV
- *-- picklist functions)
- *-- Written for.: dBASE IV, 1.1
- *-- Rev. History: 05/23/1991 - original procedure.
- *-- 12/14/1991 - Modified by Jim Magnant (TXAGGIE) - to
- *-- check for columns exceeding 79, and temporarily change
- *-- last col. value (so routine doesn't "blow up").
- *-- 01/27/1992 -- Modifiedy by Ken Mayer to check for
- *-- bottom of screen, based on what Jim did above. No
- *-- further than 23.
- *-- Calls.......: None
- *-- Called by...: Too many to list ...
- *-- Usage.......: do shadow with <nULRow>,<nULCol>,<nBRRow>,<nBRCol>
- *-- Example.....: save screen to sMain
- *-- activate screen
- *-- define window wError from 5,15 to 15,65 double color;
- *-- rg+/r,rg+/r,rg+/r
- *-- do shadow with 5,15,15,65
- *-- activate window WError
- *-- && perform actions in window
- *-- release window WError
- *-- restore screen from sMain
- *-- release screen sMain
- *-- Returns.....: None
- *-- Parameters..: nULRow = Upper Left Row position
- *-- nULCol = Upper Left Column position (x,y)
- *-- nBRRow = Bottom Right Row position
- *-- nBRCol = Bottom Right Column position (x2,y2)
- *-----------------------------------------------------------------------
-
- parameters nULRow,nULCol,nBRRow,nBRCOL
- private nTempRow,nTempCol,nIncRow,nIncCol
-
- m->nTempRow = iif(m->nBRRow+1>23,23,m->nBRRow+1)
- m->nTempCol = iif(m->nBRCol+2>79,79,m->nBRCol+2)
- m->nIncRow = 1
- m->nIncCol = (m->nBRCol-m->nULCol) / (m->nBRRow-m->nULRow)
- do while m->nTempRow <> m->nULRow .or. m->nTempCol <> m->nULCol+2
- m->nRightCol = m->nBRCol
- m->nBRCol = iif(m->nBRCol + 2 > 79,77,m->nBRCol)
- nBotRow = m->nBRRow
- m->nBRRow = iif(m->nBRRow + 1 > 23,22,m->nBRRow)
- @ m->nTempRow,m->nTempCol fill to m->nBRRow+1,m->nBRCol+2 ;
- color n+/n
- m->nBRCol = m->nRightCol
- m->nBRRow = nBotRow
- m->nTempRow = iif(m->nTempRow<>m->nULRow,m->nTempRow - ;
- m->nIncRow,m->nTempRow)
- m->nTempCol = iif(m->nTempCol<>m->nULCol+2,m->nTempCol -;
- m->nIncCol,m->nTempCol)
- m->nTempCol = iif(m->nTempCol<m->nULCol+2,m->nULCol+2,;
- m->nTempCol)
- enddo
-
- RETURN
- *-- EoP: Shadow
-
- *-----------------------------------------------------------------------
- *-- End of Program: LISTFILE.PRG
- *-----------------------------------------------------------------------